home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 028a / arj230.exe / REARJ.DOC < prev    next >
Text File  |  1992-01-19  |  19KB  |  492 lines

  1.  
  2.  
  3.      User's Manual for the REARJ archive conversion program, January 1992
  4.  
  5.  
  6.     REARJ software and manual copyright (c) 1991-92 by Robert K Jung.
  7.     All rights reserved.
  8.  
  9.     REARJ version 2.23 release
  10.  
  11.  
  12.  
  13.      INTRODUCTION:
  14.  
  15.      REARJ is an archive conversion program designed to facilitate the
  16.      conversion of LZH, ZIP, PAK, ARC, DWC, HYP, LZS, and ZOO archives to
  17.      the ARJ format.
  18.  
  19.      Registered ARJ users can order an improved version of REARJ that
  20.      offers !listfile selection and exclusion, file date-time selection,
  21.      REARJ_SW environment variable support, skipping a conversion when
  22.      the converted archive is larger, and other features.  And more
  23.      registered REARJ enhancements will be forthcoming.
  24.  
  25.  
  26.      MAJOR FEATURES:
  27.  
  28.      Supports all major archiver programs (PAK, LHARC, PKZIP, ZOO, ARJ,
  29.      PKPAK, DWC, HYPER, LARC, LHA).
  30.  
  31.      Supports file attributes within archives.
  32.  
  33.      Supports directories within archives.
  34.  
  35.      Supports converting archives within archives (ZIPs in a ZIP).
  36.  
  37.      Ensures reliable archive conversion with a file count and total size
  38.      check.
  39.  
  40.      Supports the use of virus checkers and BBS ad removers.
  41.  
  42.      Supports recursive scanning through subdirectories.
  43.  
  44.      Optional logging of conversions.
  45.  
  46.  
  47.      ********************
  48.      * WORDS OF CAUTION:*
  49.      ********************
  50.  
  51.      If you plan to convert many archives at one time, it is STRONGLY
  52.      suggested that you make a backup of your hard disk.  This is a wise
  53.      precaution to take any time that you make major modifications to data
  54.      on your hard disk drive.
  55.  
  56.      The standard REARJ conversion DOES NOT convert any archive comments
  57.      and volume labels.  They will be lost.
  58.  
  59.      Some of the other archivers have significant bugs which can cause data
  60.      loss that REARJ cannot detect.  It is not the purpose of this document
  61.      to point out other program's shortcomings.  I suggest logging the
  62.      conversion output to a printer to facilitate checking for errors.
  63.  
  64.      If the archives you are converting will ONLY extract to absolute
  65.      paths, you must use the /w option to set the working directory to an
  66.      empty root directory such as a RAMDRIVE.  This will allow extraction
  67.      to the root.
  68.  
  69.      REARJ and the archiver executables must be located in the DOS PATH
  70.      directories. This is due to REARJ creating and using a temporary
  71.      directory.
  72.  
  73.      If you have changed the MS-DOS switch character from "/" to another
  74.      character via an undocumented MS-DOS interrupt or the TurboC
  75.      setswitchar() function, REARJ may not work properly with the default
  76.      REARJ.CFG configuration file.
  77.  
  78.      The most thorough testing was done with ARJ as the target format and
  79.      ZIP as the original format.  In any case, you should verify that the
  80.      extract commands of your favorite archive formats in the configuration
  81.      file are correct.    The extract commands are the most important to get
  82.      right because REARJ has a built-in verification procedure to ensure
  83.      that the ADD commands executed properly.
  84.  
  85.      Be sure you have enough disk space on your working directory to
  86.      extract the largest archive that you want to convert!!!
  87.  
  88.  
  89.      The versions of archivers tested:
  90.  
  91.      ARJ   1.00, 1.10, 2.00, 2.10, 2.20, 2.21, 2.30
  92.      LHA   2.12, 2.13
  93.      PAK   2.51
  94.      PKZIP 1.10
  95.      PKPAK 3.61
  96.      ZOO   2.01, 2.10
  97.      DWC   A5.01
  98.      LARC  3.33
  99.      HYPER 2.5
  100.  
  101.  
  102.      INSTALLATION:
  103.  
  104.      Copy REARJ.EXE and REARJ.CFG to one of the DOS PATH directories.  They
  105.      do not have to be placed in the same directory.  The PATH directories
  106.      are usually set by the PATH command in your AUTOEXEC.BAT file.  At
  107.      this version of REARJ, changing its name to something else will cause
  108.      operation difficulties.
  109.  
  110.      Be sure the archiver programs (ARJ, PAK, PKZIP, PKUNZIP, etc.) and
  111.      virus scanner are installed in a DOS PATH directory!
  112.  
  113.      This version assumes that you have the new SCAN version 80 and uses
  114.      the new option /sub to scan subdirectories.
  115.  
  116.  
  117.      OPERATION OF REARJ:
  118.  
  119.      REARJ will build a temporary directory in the current directory and
  120.      extract the archive(s) to this directory.    REARJ will then build the
  121.      target archive(s) with the files in this directory.  If the target
  122.      archiver does not support reading of hidden or system files, REARJ
  123.      will reset those bits and then re-archive the files without those
  124.      attributes.  If the original archive has directories in it, REARJ will
  125.      extract it with full paths and re-archive it with full paths if the
  126.      target archiver supports directories.  In this case, if the archiver
  127.      does not support directories, REARJ will skip converting this archive.
  128.  
  129.      If the "/a" option has been selected, REARJ will execute REARJ to
  130.      convert any internal archives of the same type to the target format.
  131.      Any "/s" option will be carried over to the recursive REARJ command.
  132.  
  133.      As an extra test, REARJ will count the files extracted from the
  134.      original archive and total their sizes.  Then REARJ will extract the
  135.      new archive and count the files and total the sizes.  If the count and
  136.      size do not match, REARJ will skip converting the archive.
  137.  
  138.      REARJ assumes that the supported archivers will pass a non-zero error
  139.      code when there is an operation failure.
  140.  
  141.  
  142.      COMMAND SYNTAX:
  143.  
  144.      REARJ [switch options] filespec(s) or wildspec(s)
  145.  
  146.      You can specify one or more filespecs on the command line.  These
  147.      filespecs can have paths and wildcards.  Up to 100 filespecs can be
  148.      accepted by REARJ.  If you specify *.* as a wildspec, REARJ will look
  149.      at all filenames, but will skip those filenames not ending in standard
  150.      archive suffixes.    If you specify the /r switch, REARJ will look for
  151.      filenames matching the filespec(s) in the current directory and all
  152.      subdirectories of the current directory.
  153.  
  154.      The switch options and filespecs can be entered in any order.  REARJ
  155.      uses the default MS-DOS switch character "/".  REARJ uses the Turbo
  156.      C++ function getswitchar() to determine the MS-DOS switch character.
  157.      If the switch character is "-", REARJ will translate any UNIX style
  158.      pathnames to MS-DOS syntax ("dir/file" to "dir\file").
  159.  
  160.  
  161.      SWITCH OPTIONS:
  162.  
  163.      /a - convert archives within archives
  164.  
  165.       This option causes REARJ to recursively execute REARJ to convert
  166.       any archives of the original type found within the original
  167.       archive (ex. ZIPs within a ZIP).  This option requires additional
  168.       memory to execute successfully.
  169.  
  170.       You may specify the type of internal archive to convert with the
  171.       "/a" option.
  172.  
  173.       Examples:  REARJ *.zip /aLZH    convert only internal LZH archives.
  174.              REARJ *.zip /a*    convert any internal archive.
  175.  
  176.       If you use the "/a*" option, you may need to also specify "/u"
  177.       because of nested archives of the target type.
  178.  
  179.      /b - execute command before extracting files
  180.  
  181.       This option is used to specify a DOS command to be executed before
  182.       extracting the original archive.
  183.  
  184.       In addition, REARJ passes the name of the original archive to
  185.       this command as a command line argument when executing it.  This
  186.       may cause a problem with DOS commands that expect no arguments.
  187.       A workaround would be to install the DOS command in a batch file.
  188.  
  189.       This feature is to allow the user to prep the environment before
  190.       extracting the archive.  This can be used to prep for archive
  191.       comments or volume labels, etc.
  192.  
  193.      /c - execute command on extracted files before counting them
  194.  
  195.       This option is used to specify a DOS command to be executed upon
  196.       the extracted files before REARJ counts them for later
  197.       verification.  This is to allow executing a DOS or batch command
  198.       to clean up the extracted files (remove BBS advertisements, etc).
  199.       REARJ does not check for any returned error code from the
  200.       executed command.
  201.  
  202.       In addition, REARJ passes the name of the original archive to
  203.       this command as a command line argument when executing it.  This
  204.       may cause a problem with DOS commands that expect no arguments.
  205.       A workaround would be to install the DOS command in a batch file.
  206.  
  207.      /d - delete the original archive
  208.  
  209.       This option causes REARJ to delete the original archive after a
  210.       successful conversion to the target format.  This option will NOT
  211.       delete read-only archives.
  212.  
  213.      /e - do not return error if no archives were found
  214.  
  215.       This option is used by the internal recursive REARJ.    This option
  216.       will cause REARJ to return a zero exit code if no matching
  217.       archives were found.    Usually, REARJ returns a non-zero exit
  218.       code for this condition.
  219.  
  220.      /f - convert diskette archives
  221.  
  222.       This option is used to facilitate the conversion of archives on a
  223.       diskette.  If you do not have sufficient space on the diskette to
  224.       keep the original archives, you MUST specify the "/d" option as
  225.       in "REARJ A:*.zip /f /d".
  226.  
  227.       This option causes REARJ to build the target archive in the
  228.       CURRENT directory (not the working temporary directory).  After
  229.       verification, REARJ will, if specified, delete the original
  230.       archive and then copy the new archive to the diskette.  You
  231.       should make sure that the current directory does not contain any
  232.       archives before executing REARJ.
  233.  
  234.      /i - check program integrity
  235.  
  236.       This option causes REARJ to validate the REARJ program on disk.
  237.       If you are using a pre-3.0 MS-DOS revision, you will have to
  238.       specify the full program name as in "REARJ /i\util\rearj.exe".
  239.  
  240.      /l - write conversion data to log file
  241.  
  242.       This option causes REARJ to open a log file and record each
  243.       successful conversion in the log file.  The default log file name
  244.       is REARJ.LOG.  You can specify the log file name as in
  245.       "REARJ /lfilename *.ZIP".  If the log file already exists, REARJ
  246.       will append logging data to it.
  247.  
  248.      /o - overwrite existing target archive
  249.  
  250.       This switch is used to delete already existing target archives.
  251.       This is not used for updating archives.  Use the /u option for
  252.       updating an archive.
  253.  
  254.      /q - query for each archive to convert
  255.  
  256.       This switch causes REARJ to pause and prompt the user for
  257.       permission to convert individual archives.  Note that REARJ will
  258.       not prompt when skipping archives.
  259.  
  260.      /r - recurse through subdirectories
  261.  
  262.       This switch causes REARJ to look for archives in all included
  263.       subdirectories as well as in the current directory.  This switch
  264.       allows the user to convert all archives on a hard disk with one
  265.       command.
  266.  
  267.      /s - skip verify of file count and total size
  268.  
  269.       Skip the overhead of the file count and total size verification
  270.       process.  This verification costs an extra extraction, but this
  271.       check is worth the time, especially when converting a large
  272.       number of archives.
  273.  
  274.      /t - specify the target archive type
  275.  
  276.       The default target archive format is normally ARJ.  This can be
  277.       changed by building an external REARJ.CFG file.  The first
  278.       archive type is always the default format.  To override the
  279.       default format, the user can specify the /t switch as in
  280.       "REARJ *.ZIP /tlzh".    The previous example has specified that LZH
  281.       is the target format.
  282.  
  283.      /u - allow update of archive with backup
  284.  
  285.       This switch is used to re-archive an archive, possibly to take
  286.       advantage of improved compression.  The original archive is
  287.       backed up by renaming it with the backup suffix which by default
  288.       is "BAK".  You may specify another backup suffix with the /u
  289.       option as in "REARJ *.ARJ /uar$" where the backup suffix is
  290.       "ar$".  Since this option creates a brand new archive, archive
  291.       comments will be lost.  Do NOT specify a "." in the suffix.
  292.  
  293.      /v - execute configured command on extracted files
  294.  
  295.       This switch is used to execute a configure command on the files
  296.       extracted from the original archive.    The intent is to allow
  297.       virus scanning of the archive contents.  The command must be
  298.       specified in the REARJ.CFG file.
  299.  
  300.       The command may be placed in the REARJ.CFG file by inserting one
  301.       line ahead of the archive commands.  The line must start with the
  302.       word "VIRUS" followed by a blank and the external command.
  303.  
  304.       Example:  VIRUS scan /nomem *.*
  305.  
  306.       If the invoked command returns a non-zero error code, REARJ will
  307.       skip the conversion of that archive and log the error as code 13.
  308.  
  309.       REARJ *.* /v
  310.  
  311.      /w - set working directory
  312.  
  313.       By default, REARJ creates a temporary working directory in the
  314.       current directory.  This option allows you to specify the working
  315.       directory.  The working directory must be EMPTY when invoking
  316.       REARJ.  This directory is used to hold the extracted files.
  317.       This is NOT considered the current directory for /f use.
  318.  
  319.       Example:  REARJ *.* /wd:\
  320.  
  321.       This option helps solve the absolute pathname extraction problem
  322.       that some archivers have.  If you set the working directory to an
  323.       empty root directory, the archiver can extract to the root and
  324.       REARJ will be able to find all of the files to re-archive them.
  325.       However, this option will NOT work for internal archives that
  326.       extract to absolute paths.
  327.  
  328.      /x - exclude filenames or wildnames from the conversion process
  329.  
  330.       You can exclude one or more files from the conversion process.
  331.       The filenames can contain wildcards.
  332.  
  333.       REARJ *.ZIP /xONE.ZIP /xTWO.ZIP
  334.  
  335.      /z - simulate conversion process
  336.  
  337.       This switch causes REARJ to simulate the conversion process.    No
  338.       archives will be extracted, built, or deleted.
  339.  
  340.  
  341.      EXAMPLES:
  342.  
  343.      REARJ *.ZIP           this converts all ZIP files in the current
  344.                    directory to ARJ files.
  345.  
  346.      REARJ *.ZIP *.ARC           this converts ZIP and ARC files to ARJ
  347.                    files.
  348.  
  349.      REARJ SOFT.ZIP           this converts only SOFT.ZIP to SOFT.ARJ.
  350.  
  351.      REARJ A:*.ZIP /f /d       convert ZIPs on A drive with deletion of
  352.                    each original archive upon successful
  353.                    conversion.
  354.  
  355.      REARJ *.ARC /r           this converts all ARC files in the current
  356.                    directory and in subdirectories of the
  357.                    current directory to ARJ files.
  358.  
  359.      REARJ SOFT.ARJ /tZIP       this converts SOFT.ARJ to SOFT.ZIP.
  360.  
  361.      REARJ *.ARJ /u           re-archive all ARJ archives.
  362.  
  363.      REARJ *.* /v /wd:\        re-archive all archives and execute
  364.                    configured command on extracted files
  365.                    using d:\ as the temp directory.
  366.  
  367.  
  368.      EXTERNAL CONFIGURATION FILE
  369.  
  370.      REARJ comes with a configuration file, REARJ.CFG, which supports
  371.      conversion between the ARJ, ARC, LZH, PAK, ZIP, DWC, LZS, HYP, and ZOO
  372.      formats.  The commands PKPAK and PKUNPAK are used for ARC files.  The
  373.      command LHA is used for LZH files.  You can change these defaults by
  374.      editing the configuration file.
  375.  
  376.      The format of the configuration file is fairly simple.
  377.  
  378.      The first line can optionally specify an external command to be
  379.      executed by REARJ when the "/v" option is selected.  This line must
  380.      start with the word "VIRUS" minus the quotes, followed by a space,
  381.      followed by the external command.
  382.  
  383.      Example:  VIRUS SCAN /nomem *.*
  384.  
  385.      If you do not want to configure this item, DO NOT insert a blank line.
  386.  
  387.      Each archive format requires four lines in the file.
  388.  
  389.      The first line is the format suffix.
  390.  
  391.      The second line is the archive ADD command with a %s in the place of
  392.      the archive name.    Any other percent signs in the command must be
  393.      preceded by "\" as in "\%".  The ADD command should support directory
  394.      inclusion and reading of hidden and/or system files.  REARJ will parse
  395.      this command line using the space character as the token separator.
  396.  
  397.      If your ADD command requires DOS piping as the ZOO archiver requires,
  398.      you must precede the ADD command with the text "COMMAND /C ".
  399.  
  400.      Example:  ARJ a -a -r -jt %s
  401.            COMMAND /C STUFF *.* | ZOO aI %s
  402.  
  403.      The third line is the archive EXTRACT command with a %s in the
  404.      place of the archive name.  Any other percent signs in the command
  405.      must be preceded by "\" as in "\%".  The EXTRACT command should
  406.      support directory recreation if the archive contains directories.
  407.      The extraction of directories must be to child directories within the
  408.      current directory.  REARJ will parse this command line using the space
  409.      character as the token separator.
  410.  
  411.      If your EXTRACT command requires DOS piping, you must precede the
  412.      EXTRACT command with the text "COMMAND /C ".  Beware that command exit
  413.      codes are not passed back to REARJ when using COMMAND /C.
  414.  
  415.      The fourth line contains the letters "A" and/or "D" or no letters.
  416.      The "A" stands for the ability to process files with the hidden and/or
  417.      system attribute.    The "D" stands for full support of directory trees
  418.      within archives.  No letters (blank line) stands for no support for
  419.      hidden or system files or for archive containing directories.
  420.  
  421.      There must be NO EXTRA blank lines or comments in the file.  You may
  422.      use leading blanks for clarity.
  423.  
  424.      See the supplied REARJ.CFG for the current configuration.
  425.  
  426.      If you use a different archiver program, you will need to either
  427.      rename the program to one of the supported ones or you will need to
  428.      modify the installed REARJ.CFG file.
  429.  
  430.      If your original archive format supports extraction to absolute
  431.      directory paths as opposed to relative directory paths and you have
  432.      such archives containing absolute paths, you should not put directory
  433.      extraction in the REARJ.CFG file unless you use the /w option to set
  434.      the working directory to an empty root directory.
  435.  
  436.      You can add comment handling to the ARJ command by adding the
  437.      "-zcomment.txt" option.  This is supported at ARJ 2.20 and above.
  438.  
  439.  
  440.      LOG FILE DATA
  441.  
  442.      When logging is enabled, REARJ will log the action on each selected
  443.      file.  For successful conversions, REARJ logs the date-time, target
  444.      archive type, original archive size, new archive size, bytes saved,
  445.      and original archive name.
  446.  
  447.      When selected files are skipped for any reason, REARJ will log an
  448.      entry in the log file (when logging is enabled) which specifies the
  449.      reason code for skipping the file.  The following are the codes:
  450.  
  451.      1    = File not found
  452.      2    = File is not a configured archive type
  453.      3    = Target archive already exists
  454.      4    = Not enough disk space
  455.      5    = User skipped or user did not select update option
  456.      6    = UNPACK error
  457.      7    = PACK error
  458.      8    = Target cannot support directories
  459.      9    = Wrong file count
  460.      10 = Wrong total size
  461.      11 = Internal archive REARJ error
  462.      12 = Rename archive error
  463.      13 = Invoked /v command error (found a virus?)
  464.  
  465.  
  466.      LICENSE POLICY:
  467.  
  468.      For personal (not at the office) use, the shareware version of
  469.      REARJ may be freely used only by ARJ users.  An ARJ user is one who
  470.      uses ARJ on a regular basis.  Others who wish to use REARJ must
  471.      purchase a registration or site license for the ARJ package.
  472.  
  473.      Please refer to the LICENSE.DOC for more license information.
  474.  
  475.  
  476.      TECHNICAL SUPPORT:
  477.  
  478.      Please report any bugs.  I will TRY to fix them.  See ARJ.DOC for
  479.      details on how to contact me.
  480.  
  481.  
  482.      HISTORY:
  483.  
  484.      2.30 - Created registered version of REARJ.
  485.  
  486.      2.23 - Fixed /z processing with /f option.
  487.         Added -jg+ to ARJ in REARJ.CFG
  488.  
  489.  
  490.      end document
  491.  
  492.